import Vue from 'vue';
import Router from 'vue-router';


function loadView(view) {return () => import(`@/components/${view}.vue`)}
Vue.use(Router)
export default new Router({
	mode: 'history',
	linkExactActiveClass: 'showActive',
	base:'personal',
	routes: [
		{
  			path: '/login',
	      	name: 'login',
	      	authName:'login',
	      	whileRoute:true,
	      	txtName:'登录',
	      	component: {
	        		template : '<zh-login />'
				},
  		},
		{
			path: '/',
			name: 'home',
			txtName: '首页',
			component: {
	        		template : '<zh-main />'
				},
			children: [
				
			]
			
		},
		// {
		// 	path: '*',
		// 	name: 'error',
		// 	authName: 'error',
		// 	txtName: "错误",
		// 	component: {
		// 		template : '<zh-error />'
		// 	}
		// },
		
	],
	scrollBehavior (to, from, savedPosition) {
		return { x: 0, y: 0 }
	}
});

